All Questions
5 questions
2votes
1answer
74views
Table class to fill array structure with values
The code creates a table and adds rows and columns. Does it make sense to write the code like this? Would you design it differently? Is there a better OOP approach to this? ...
2votes
2answers
144views
Random distribution in Ruby
Below is a Ruby implementation of a random statistical event, based on a hash with the actual observed counts of outcomes. I'd be interested in feedback in particular on what techniques I might use ...
4votes
1answer
205views
Simple Ruby program to model a prepaid transit card system
I have written a simple Ruby program to model a transit card system which aims to address the following user stories. I wanted to see whether I could get any feedback on it. My main interest is ...
3votes
1answer
329views
Test cases for an elevator simulator
I'm trying to test an elevator simulator program that runs in the console and requires user interaction. At the moment, my tests look like this: ...
1vote
1answer
927views
Orange Tree simulator
I'm practicing SOLID principles and the concept of making a clear distinction between an object's private and public interfaces. ...